package cn.ctodb.commons.file.client;

import java.io.IOException;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public abstract class ObjectStorage {
	public Logger logger = LoggerFactory.getLogger(this.getClass());

	protected Properties properties = null;

	public void setProperties(Properties properties) {
		this.properties = properties;
		init();
	}

	public Properties getProperties() {
		return properties;
	}

	protected void init() {
	}

	public abstract byte[] load(String fileid) throws IOException;

	public abstract void delete(String fileid) throws IOException;

	public abstract String save(byte[] bytes, String extName) throws IOException;

}
